package main

import "fmt"

type Student2 struct {
	name string
	age  int
	addr string
}

func main() {
	stu1 := Student2{}
	defer fmt.Println(stu1) //当前状态的stu1 最后打印
	stu1.age = 25
	stu1.addr = "address25"
	fmt.Println(stu1)
	changeStu1(stu1)
	fmt.Println(stu1)

	changeStu1_Point(&stu1)
	fmt.Println(stu1)

	//stu2 := Student{}
	//stu2.High = 170
	//fmt.Println(stu2)
}
func changeStu1_Point(student2 *Student2) {
	student2.name = "hi"
}
func changeStu1(student Student2) {
	student.name = "hi"
}
